<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>


<div class="container-fluid">
    <div class="row">
        <div class="col-md-10">
            <h4>Groupes</h4>
            
            <table id="tableGroupes" class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Libellé</th>
                        <th>ID Siecle</th>
                        <th>Effectif</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <c:forEach items="${groupes}" var="g">
                    <tr>
                        <td>${g.id}</td>
                        <td>${g.libelle}</td>
                        <td>${g.codeStructure}</td>
                        <td>${g.nbEleves}</td>
                        <td class="buttons">
                            <button type="button" class="btn btn-primary btn-xs" onClick="javascript:location='<c:url value="groupe.edit?structureid=${g.id}" />'">Modifier</button>
							<button type="button" class="btn btn-default btn-xs" onClick="javascript:location='<c:url value="groupe.delete?structureid=${g.id}" />'">Supprimer</button>
                        </td>
                    </tr>
                    </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>
